Skip to content

Conversation

@ValdikSS
Copy link
Member

Everything from libcupsfilters MR: OpenPrinting/libcupsfilters#92

Add new dithering (halftone) algorithms in addition to the default Ghostscript one.
Controlled either with halftone-type job option or cupsHalftoneType PPD option.

  • Stochastic algotirhm is implemented in stocht.ps Ghostscript library, just include it if cupsHalftoneType is set to yes/true/on/stochastic.
  • Foo2zjs algorithm is a PostScript code taken from foo2zjs-pstops file (don't know the name of the algorithm)

Default algorithm

dither-default

Stochastic algorithm

dither-stoh

Foo2zjs algorithm

dither-foo2zjs

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks the same as libcupsfilters one - I have the same comments: some code style and request for someone who understands the functionality better.

@zdohnal
Copy link
Member

zdohnal commented May 28, 2025

Either way, thank you for the PR, @ValdikSS !

@ValdikSS ValdikSS force-pushed the ghostscript-dither-repo branch from 9e5bee7 to 035508c Compare May 29, 2025 17:45
@ValdikSS
Copy link
Member Author

Looks the same as libcupsfilters one - I have the same comments: some code style and request for someone who understands the functionality better.

Fixed, rebased and force-pushed.

@ValdikSS ValdikSS requested a review from zdohnal May 29, 2025 17:55
Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as libcupsfilters.

@ValdikSS ValdikSS force-pushed the ghostscript-dither-repo branch from 035508c to 394f816 Compare May 30, 2025 10:22
@ValdikSS
Copy link
Member Author

The same as libcupsfilters.

Done

@ValdikSS ValdikSS requested a review from zdohnal May 30, 2025 10:22
Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the change - I have missed one place where we have to guard better against NULL, so it would be great if you looked into that.

@ValdikSS ValdikSS force-pushed the ghostscript-dither-repo branch from 394f816 to 40a6d35 Compare June 2, 2025 11:21
@ValdikSS ValdikSS requested a review from zdohnal June 2, 2025 11:23
ValdikSS added 2 commits June 8, 2025 23:15
…thms

Add new dithering (halftone) algorithms in addition to the default Ghostscript
one.
Controlled either with `halftone-type` job option or `cupsHalftoneType` PPD
option.

- Stochastic algotirhm is implemented in `stocht.ps` Ghostscript library,
  just include it if cupsHalftoneType is set to yes/true/on/stochastic.
- Foo2zjs algorithm is a PostScript code taken from foo2zjs-pstops file
  (don't know the name of the algorithm)
Similar to pdftoraster implementation.
@ValdikSS
Copy link
Member Author

ValdikSS commented Jun 8, 2025

Removed the stray ), fixed the compilation.

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Now I'm waiting for other guys to review it from technological side as well on libcupsfilters project, but the feature makes sense to me atm.

Copy link
Member

@zdohnal zdohnal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My view from my last comment still stands.

@tillkamppeter tillkamppeter merged commit 7378c22 into OpenPrinting:1.x Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants